Modern IC designs are more and more based on pre-existing functional units (IP-units) that are reused in a new combination. Such IP-units may comprise for example data processing units, storage units and interface units. Flash-memory, in particular NAND Flash memory is usually applied as a non-volatile storage medium.
Flash-memory is organized as large plurality (typically thousands) of storage blocks. Each storage block is subdivided in number (typically some tens, e.g. 32 or 64) of storage pages. The contents of the Flash-memory cannot be modified arbitrarily. Data can only be erased on a storage block basis and written on a storage page basis. Accordingly if new data is written to the Flash-memory, this is only possible if it is part of an entire storage page that is written. Writing a storage page is only possible if that storage page was still erased. Otherwise, first the storage block to which the storage page belongs has to be erased.
An important difference between Flash-memory and other solid-state memories is that, when shipped, it is not guaranteed that all memory cells in a Flash-memory device operate correctly. It may be the case that some memory cells fail. During operation the number of erroneous memory cells may even increase. Hence, redundant data is required to detect errors, and preferably to recover the data from failing memory cells. Redundant data will also be denoted here as ECC data.
To facilitate error correction the Flash-memory device reserves space for storage of ECC-data in addition to the data that was originally intended for storage (user data). An ECC unit provides for the calculation of the ECC-data from the user data and for correcting the stored user data using the ECC-data. Various error correcting detecting methods are known, including for example Reed-Solomon and the Hamming method.
The earlier versions of Flash-memory typically have a storage page size of 528 bytes. The storage space includes room for storage of user data, for storage of ECC-data.
Outside the user data and the ECC-data, the storage pages of the Flash-memory also provide an additional space of a few bytes for storage of data known as Out Of Band data (OOB). Flash based file systems typically use this additional space to store metadata, like, for instance, information about the health of the page (defect or not). In addition the additional space is used by the manufacturer to store memory reliability data in order to mark a defective storage block. This location is the only one which is guaranteed to be correctly readable. The additional space may be more robust in the implementation of the Flash-memory. But this is not a requirement. It is however guaranteed by the manufacturer to be readable. Any device for which this is not the case will not be shipped.
The test procedure that each Flash-memory chip undergoes in the factory is quite elaborate to reliably detect faulty storage blocks. For example, during these tests the chips are stressed with higher and lower temperatures and higher and lower supply voltages. It is strongly advised to use the memory reliability data, as it may significantly reduce the chance of data loss.
In most older, small page Flash-memory chips the first 512 of the 528 bytes are reserved for user data, the next 6 bytes for OOB-data, and the last 10 bytes for ECC-data. One bad block marking scheme that is applied in those older Flash-memory chips, is that the 517th byte of the page (the sixth byte in the spare area), in the first and second page of each storage block indicates whether the storage block is unreliable. If this byte is unequal to 0xFF, the storage block should be considered unreliable. For 16-bit devices holds that the bad block marking is placed in the 256th and the 261th word (the first and the sixth word of the additional space) of the first and the second page of each block.
Commonly available Flash-memory IP is based on 512+16 byte pages. The interface accelerates reading and writing of Flash-memory by providing hardware ECC. The ECC hardware detects, and optionally attempts to correct errors.
However, most large Flash-memory devices are now only available in larger storage page sizes e.g. 2 Kbytes, and even devices with 4 kB storage pages are under development. These modern Flash-memory devices are not compatible with the commonly available Flash-memory interface IP. Those larger page devices have another arrangement of OOB-data within the user data and ECC-data. For example in the 2 Kbyte page the first 2048 is intended for user data, the next 24 bytes for OOB-data and the last 40 bytes for ECC-data.
The common way of overcoming this incompatibility is to treat the large page as a collection of small ones, each with it's own ECC.
This would necessitate transferring the OOB-data to a different location in the large page, which is not guaranteed to be correctly readable. Additionally software compatibility is lost.